'''oto/constants.py

This module contains constants for oto.
'''

__authors__ = [u'Ryan Rousseau <ryan.rousseau@gmail.com>']
__license__ = u'''Oranges to Oranges
Copyright (C) 2006  Ryan Rousseau

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
'''

import os

# gconf constants
DEFAULT_OTO_DIR = os.path.join(os.environ['HOME'], '.oto')
DEFAULT_LOG_DIR = os.path.join(DEFAULT_OTO_DIR, 'log')
DEFAULT_SITE_DIR = os.path.join(DEFAULT_OTO_DIR, 'sites')
DEFAULT_DECK_DIR = os.path.join(DEFAULT_OTO_DIR, 'decks')

GCONF_PATH = '/apps/oto/'
GCONF_OTO_DIR = ''.join([GCONF_PATH, 'oto_dir'])
GCONF_LOG_DIR = ''.join([GCONF_PATH, 'log_dir'])
GCONF_SITE_DIR = ''.join([GCONF_PATH, 'site_dir'])
GCONF_SITE_DIR = ''.join([GCONF_PATH, 'deck_dir'])

# oto constants
PYRO_GROUP = u':oto'
IDENT_NAME = u'%s.identifier' % PYRO_GROUP

# event constants
EVENT_CHANNEL = u'oto'
CARDS_DEALT = u'cards dealt'
CHAT_ACTION = u'chat action'
CHAT_ANNOUNCEMENT = u'chat announcement'
CHAT_TALK = u'chat talk'
GAME_STARTED = u'game started'
GAME_STOPPED = u'game stopped'
JUDGING_STARTED = u'judging started'
JUDGING_STOPPED = u'judging stopped'
PLAYER_CONNECTED = u'player connected'
PLAYER_DISCONNECTED = u'player disconnected'
SUBMITTING_STARTED = u'submitting started'
SUBMITTING_STOPPED = u'submitting stopped'

# result constants
ERROR = u'Error'
E_ALREADY_PLAYED = u'You have already played this round'
E_INVALID_CARD = u'"%s" is not a valid choice'
E_INVALID_CREDENTIALS = u'Invalid credentials'
E_GAME_IN_PROGRESS = u'This game is already in progress'
E_GAME_NOT_STARTED = u'Game has not started'
E_JUDGING = u'Judging is taking place'
E_NAME_IN_USE = u'The name "%s" is already in use'
E_NO_DECK = u'Deck has not been chosen'
E_NO_DECK = u'Rules have not been chosen'
E_NOT_CONNECTED = u'You are not connected to the game'
E_NOT_JUDGE = u'You are the judge this round'
E_NOT_YOUR_CARD = u'That is not your card'

SUCCESS = u'Success'
S_CARD_SUBMITTED = u'Your card was submitted'
S_CARDS_DEALT = u'Cards have been dealt'
S_CONNECT_TO_THE_GAME = u'Successfully connected to the game'
S_DECK_SET = u'Deck has been set'
S_DISCONNECTED = u'Disconnected from the game'
S_NUM_PLAYERS_SET = u'Number of players set'

# status constants
GAME_IN_PROGRESS = u'in progress'
GAME_STOPPED = u'stopped'
ROUND_JUDGING = u'judging'
ROUND_SUBMITTING = u'submitting'
WAIT = u'wait'
